#!/usr/bin/env python

import sys
import Tkinter as tk
from libtovid.guis.helpers import SetChaptersGui
from os import path

if len(sys.argv) < 2:
    video = None
else:
    video = sys.argv[1]
    if not path.exists(video):
        print('Error: the video file "%s" does not exist' %video)
        exit()

root = tk.Tk()
app = SetChaptersGui(root, '-osdlevel 3', 'Set chapter points with Mplayer')
app.run(video)
app.pack()

app.mainloop()

